package com.sunrate.investingquote.exception;

import com.sunrate.investingquote.enums.RetCode;

/**
 * @author yyh
 * @description:
 * @date 2023/06/19/ 10:06
 */
public class ServerException extends RuntimeException {
    private String code;
    private String message;

    public ServerException(String code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }

    public ServerException(RetCode retCode) {
        super(retCode.getMessage());
        this.code = retCode.getCode();
        this.message = retCode.getMessage();
    }
}
